[meld] Minor PEP8 and style fixes
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Minor PEP8 and style fixes
- Date: Fri, 17 May 2013 21:36:29 +0000 (UTC)
commit 9ab8b00d728107149070f3259370f53fc5cc4159
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat May 18 07:28:13 2013 +1000
Minor PEP8 and style fixes
meld/vc/svn.py | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/meld/vc/svn.py b/meld/vc/svn.py
index 42cb7c2..8b27275 100644
--- a/meld/vc/svn.py
+++ b/meld/vc/svn.py
@@ -23,14 +23,13 @@
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import errno
+import glob
import os
-import re
import shutil
import tempfile
import xml.etree.ElementTree as ElementTree
from . import _vc
-from glob import glob
class Vc(_vc.CachedVc):
@@ -122,33 +121,32 @@ class Vc(_vc.CachedVc):
# First fine what type of conflict this is by looking at the base
# we can possibly return straight away!
conflict_type = None
- base = glob('%s.working' % path)
+ base = glob.glob('%s.working' % path)
if len(base) == 1:
# We have a merge conflict
conflict_type = CONFLICT_TYPE_MERGE
else:
- base = glob('%s.mine' % path)
+ base = glob.glob('%s.mine' % path)
if len(base) == 1:
# We have an update conflict
conflict_type = CONFLICT_TYPE_UPDATE
if conflict_type is None:
- raise _vc.InvalidVCPath(
- "We don't know what type of conflict this is.")
+ raise _vc.InvalidVCPath(self, path, "No known conflict type found")
if conflict == _vc.CONFLICT_BASE:
return base[0], False
elif conflict == _vc.CONFLICT_THIS:
if conflict_type == CONFLICT_TYPE_MERGE:
- return glob('%s.merge-left.r*' % path)[0], False
+ return glob.glob('%s.merge-left.r*' % path)[0], False
else:
- return glob('%s.r*' % path)[0], False
+ return glob.glob('%s.r*' % path)[0], False
elif conflict == _vc.CONFLICT_OTHER:
if conflict_type == CONFLICT_TYPE_MERGE:
- return glob('%s.merge-right.r*' % path)[0], False
+ return glob.glob('%s.merge-right.r*' % path)[0], False
else:
- return glob('%s.r*' % path)[-1], False
-
+ return glob.glob('%s.r*' % path)[-1], False
+
raise KeyError("Conflict file does not exist")
def _repo_version_support(self, version):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]