summaryrefslogtreecommitdiff
path: root/tests/test_pretty_print.py
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2011-12-18 17:37:37 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2011-12-18 17:37:37 (GMT)
commitd900ae9a843a5191666c3e3fc34639087bf7aa09 (patch)
treeebaca70894b06d7d236ab6389cb0092c38ad94cf /tests/test_pretty_print.py
parentbb62bf4ad90184190ca9d666ec6f2457955a2ef9 (diff)
fix bug in test_pretty_print, dont try to upload 0 byte files
Diffstat (limited to 'tests/test_pretty_print.py')
-rwxr-xr-xtests/test_pretty_print.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py
index 6fdc663..53fcc37 100755
--- a/tests/test_pretty_print.py
+++ b/tests/test_pretty_print.py
@@ -432,8 +432,10 @@ def upload(wikiurl,api_php_path='/',wiki_rootpath='test', sysid='null', botname=
filename = os.path.join(wikidir,wikiname)
filedata = tryread(filename)
print 'upload',len(filedata),'bytes from',wikiname
- if wetrun:
+ if wetrun and len(filedata)>0:
wiki_upload(wikiurl,api_php_path,botname,botpass,filedata,wikiname)
+ if len(filedata)==0:
+ print 'cancelling empty upload'
def findlogfile(builddir):
logpath = os.path.join(builddir,'Testing','Temporary')
contact: Jan Huwald // Impressum