Add os.path.expanduser() wrappers to user-supplied paths.
[hooke.git] / hooke / plugin / config.py
index ea1b0397f9d657ab84008cfab5e5ef87062612d5..71e0611373b8ab4d1e2366c24240bab49a36a215 100644 (file)
@@ -21,6 +21,7 @@ associated :class:`hooke.command.Command`\s for handling
 :mod:`hooke.config` classes.
 """
 
+import os.path
 from StringIO import StringIO
 
 from ..command import Command, Argument, Failure
@@ -126,7 +127,7 @@ most local loaded config file.
         f = None
         try:
             if params['output'] != None:
-                f = open(params['output'], 'w')
+                f = open(os.path.expanduser(params['output']), 'w')
             hooke.config.write(fp=f)
         finally:
             if f != None: