|
From: <di...@us...> - 2007-01-26 18:19:03
|
Revision: 304
http://safekeep.svn.sourceforge.net/safekeep/?rev=304&view=rev
Author: dimi
Date: 2007-01-26 10:18:57 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Validate arguments as clientIDs where appropriate
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 18:10:35 UTC (rev 303)
+++ safekeep/trunk/safekeep 2007-01-26 18:18:57 UTC (rev 304)
@@ -818,12 +818,24 @@
print 'safekeep', VERSION
return
+ if mode is None:
+ mode = 'server'
if len(cfglocs) == 0:
cfglocs.append(config_dir)
- if mode is None:
- mode = 'server'
+ cfgs = parse_locs(cfglocs)
- cfgs = parse_locs(cfglocs)
+ if mode is 'client':
+ if len(args) > 0: usage(2)
+ else:
+ ok = True
+ for arg in args:
+ if arg in cfgs: continue
+ error('Unknown client ID: %s' % arg)
+ if os.path.isfile(arg):
+ error('It appears to be a file, configuration files are passed via the -C/--cfg switch.')
+ ok = False
+ if not ok: sys.exit(2)
+
try:
global is_client, verbosity_level
if mode is 'server':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|