changeset 61:a1b9dc5efa75

Raises an error when the storage name is not provided.
author John Schneiderman
date Tue, 07 Apr 2015 18:25:31 +0200
parents 2785733f7377
children e082759a26b8
files setup.py src/hwm.py
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Sat Mar 28 11:49:41 2015 +0100
+++ b/setup.py	Tue Apr 07 18:25:31 2015 +0200
@@ -33,8 +33,7 @@
 		'mercurial.hg',
 		'mercurial.ui',
 		'mercurial.error',
-		'mercurial.hgweb',
-		'filelock'
+		'mercurial.hgweb'
 	]
 
 # Basic package setup information
--- a/src/hwm.py	Sat Mar 28 11:49:41 2015 +0100
+++ b/src/hwm.py	Tue Apr 07 18:25:31 2015 +0200
@@ -59,8 +59,10 @@
 		managed.DisplayName = original.DisplayName
 		managed.Description = original.Description
 		managed.Contact = original.Contact
+	elif args.storage:
+		managed = manrepo.Repository(args.storage)
 	else:
-		managed = manrepo.Repository(args.storage)
+		raise ValueError("Missing repository storage name.")
 
 	if args.name:
 		managed.DisplayName = args.name