aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/storage')
-rw-r--r--libbe/storage/util/config.py5
-rw-r--r--libbe/storage/vcs/base.py8
2 files changed, 6 insertions, 7 deletions
diff --git a/libbe/storage/util/config.py b/libbe/storage/util/config.py
index ccd236b..a0fea0c 100644
--- a/libbe/storage/util/config.py
+++ b/libbe/storage/util/config.py
@@ -22,16 +22,15 @@ Create, save, and load the per-user config file at path().
import ConfigParser
import codecs
-import locale
import os.path
-import sys
import libbe
+import libbe.util.encoding
if libbe.TESTING == True:
import doctest
-default_encoding = sys.getfilesystemencoding() or locale.getpreferredencoding()
+default_encoding = libbe.util.encoding.get_filesystem_encoding()
def path():
"""Return the path to the per-user config file"""
diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py
index abc7a01..f8b0727 100644
--- a/libbe/storage/vcs/base.py
+++ b/libbe/storage/vcs/base.py
@@ -207,11 +207,11 @@ class VCS(object):
# methods for getting the BugDir situated in the filesystem
def _find_root(self, path):
- """
+ '''
Search for an existing bug database dir and it's ancestors and
return a BugDir rooted there. Only called by __init__, and
then only if sink_to_existing_root == True.
- """
+ '''
if not os.path.exists(path):
self.root = None
raise NoRootEntry(path)
@@ -229,9 +229,9 @@ class VCS(object):
return beroot
def _guess_storage(self, allow_storage_init=False):
- """
+ '''
Only called by __init__.
- """
+ '''
deepdir = self.get_path()
if not os.path.exists(deepdir):
deepdir = os.path.dirname(deepdir)