Package: jack / 3.1.1+cvs20050801-31

20_fix_sub_paths_warning.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Update the variable after, not before, printing the warning, otherwise the
warning is bogus ("dir-template consists of more sub-paths (3) than
scan-dirs (3)", doh).  Also fix s/he/it/ - jack is not a person.

--- a/jack_checkopts.py~	2006-01-23 14:39:36.000000000 +0000
+++ b/jack_checkopts.py	2006-01-23 14:40:50.000000000 +0000
@@ -90,8 +90,8 @@
 
     # check dir_template and scan_dirs
     if len(cf['_dir_template'].split(os.path.sep)) > cf['_scan_dirs']:
+        warning("dir-template consists of more sub-paths (%i) than scan-dirs (%i). Jack may not find the workdir next time it is run. (Auto-raised)" % (len(cf['_dir_template'].split(os.path.sep)), cf['_scan_dirs']))
         cf.rupdate({'scan_dirs': {'val': len(cf['_dir_template'].split(os.path.sep))}}, "check")
-        warning("dir-template consists of more sub-paths (%i) than scan-dirs (%i). Jack may not find the workdir next time he is run. (Auto-raised)" % (len(cf['_dir_template'].split(os.path.sep)), cf['_scan_dirs']))
 
     # check for unsername
     if cf['username']['val'] == None: