Author: andar

Revision: 5029

Log:
        Show an error message if --config option is not a directory

Diff:
Modified: trunk/deluge/main.py
===================================================================
--- trunk/deluge/main.py        2009-04-06 21:47:55 UTC (rev 5028)
+++ trunk/deluge/main.py        2009-04-06 23:20:32 UTC (rev 5029)
@@ -51,7 +51,7 @@
         \t web -- A web-based interface (http://localhost:8112)\n
         \t console -- A console or command-line interface""", action="store", 
type="str")
     parser.add_option("-c", "--config", dest="config",
-        help="Set the config location", action="store", type="str")
+        help="Set the config folder location", action="store", type="str")
     parser.add_option("-l", "--logfile", dest="logfile",
         help="Output to designated logfile instead of stdout", action="store", 
type="str")
     parser.add_option("-a", "--args", dest="args",
@@ -80,6 +80,10 @@
         options.loglevel = "none"
 
     if options.config:
+        if not os.path.isdir(options.config):
+            print "Config option needs to be a directory!"
+            sys.exit(1)
+
         if not os.path.exists(options.config):
             # Try to create the config folder if it doesn't exist
             try:



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to