changeset 122:653767ecb0fe

Use current dir time.db if exists if not ~/.getan/time.db
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 12 Dec 2011 10:23:53 +0100
parents 804211b988aa
children e18d50dda87b
files getan/contrib/zeiterfassung.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/getan/contrib/zeiterfassung.py	Mon Dec 12 10:19:52 2011 +0100
+++ b/getan/contrib/zeiterfassung.py	Mon Dec 12 10:23:53 2011 +0100
@@ -151,6 +151,12 @@
     year          = None
     empty_proj    = False
 
+    if os.path.isfile(DEFAULT_DATABASE):
+        database = os.path.abspath(DEFAULT_DATABASE)
+    else:
+        database = os.path.expanduser(os.path.join("~", ".getan",
+                                      DEFAULT_DATABASE))
+
     opts, args = getopt.getopt(
         sys.argv[1:],
         'd:u:p:e:hl:w:y:mc',
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)