aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2010-01-13 21:42:23 +0100
committerLaurent Bachelier <laurent@bachelier.name>2010-01-13 21:42:23 +0100
commit284cfbb4297d1d91c8c82e0f9a159a1614510ace (patch)
treeed556d85dedd67dd2c018d09a7c1b34567ce56b3
parentClose the file after opening it (diff)
downloadconfman-284cfbb4297d1d91c8c82e0f9a159a1614510ace.tar.xz
Use __file__ instead of argv[0]
-rwxr-xr-xexample.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/example.py b/example.py
index ccfc810..7e58dbf 100755
--- a/example.py
+++ b/example.py
@@ -7,9 +7,8 @@ options = \
'hostname': 'test',
}
-from sys import argv
from os import path
-samples_path = path.join(path.dirname(argv[0]), 'samples')
+samples_path = path.join(path.dirname(__file__), 'samples')
c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options)
c.analyze()