|
From: <di...@us...> - 2007-03-07 19:07:41
|
Revision: 438
http://safekeep.svn.sourceforge.net/safekeep/?rev=438&view=rev
Author: dimi
Date: 2007-03-07 11:07:40 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Look at the default configuration files only if they exist
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-03-07 16:54:47 UTC (rev 437)
+++ safekeep/trunk/safekeep 2007-03-07 19:07:40 UTC (rev 438)
@@ -858,15 +858,17 @@
if mode is not 'client':
if cfgfile is None:
- cfgfile = os.path.join(config_dir, 'safekeep.conf')
- props = parse_prop_file(cfgfile)
+ propfile = os.path.join(config_dir, 'safekeep.conf')
+ if os.path.isfile(propfile): cfgfile = propfile
+ if cfgfile:
+ props = parse_prop_file(cfgfile)
if 'email.smtp.server' in props:
smtp = props['email.smtp.server']
if 'email.to' in props:
email = props['email.to'].split(',')
if len(cfglocs) == 0:
locs = os.path.join(config_dir, 'clients.d')
- cfglocs.append(locs)
+ if os.path.isdir(locs): cfglocs.append(locs)
cfgs = parse_locs(cfglocs)
if mode is 'client':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|