From f8a498f76d7bbcb42cf7bbc80164d98bfe57f8ab Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 12 Dec 2009 01:43:20 -0500 Subject: Added libbe.ui.util.user for managing user ids. --- libbe/storage/util/config.py | 5 ++--- libbe/storage/vcs/base.py | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'libbe/storage') 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) -- cgit