summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/skytools/config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/skytools/config.py b/python/skytools/config.py
index fd18ef13..43d0a46b 100644
--- a/python/skytools/config.py
+++ b/python/skytools/config.py
@@ -19,7 +19,10 @@ class Config(object):
@param sane_config: chooses between ConfigParser/SafeConfigParser.
"""
# use config file name as default job_name
- job_name = os.path.splitext(os.path.basename(filename))[0]
+ if filename:
+ job_name = os.path.splitext(os.path.basename(filename))[0]
+ else:
+ job_name = main_section
# initialize defaults, make them usable in config file
defs = {