Permalink
Browse files

Pretty missing parameters and python cleanups

  • Loading branch information...
1 parent d8a865d commit 14466913f6a1cefb09bf4dff8f3d4a2a53585fd1 Kevin Landreth committed Apr 25, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 slbackup.py
View
@@ -16,7 +16,7 @@
_DEFAULT_RETENTION=30
_DEFAULT_CHECKHASH=False
-_DEFAULT_CONFIG=os.path.join(os.path.expanduser('~'), '.slbackup')
+_DEFAULT_CONFIG=os.path.expanduser('~/.slbackup')
_DEFAULT_THREADS=cpu_count()
_DEFAULT_DC='dal05'
_DEFAULT_USE_PRIVATE=False
@@ -547,12 +547,10 @@ def configure_globals(options):
configure_globals(opts)
if not hasattr(opts, 'source') or not opts.source:
- logging.fatal("Need to specify --source")
- raise ValueError("Need to specify --source")
+ args.error("Missing parameter: --source")
if not hasattr(opts, 'container') or not opts.source:
- logging.fatal("Need to specify --container")
- raise ValueError("Need to specify --container")
+ args.error("Missing parameter: --container")
logging.config.fileConfig(opts.config)
os.chdir(opts.source)

0 comments on commit 1446691

Please sign in to comment.