Author: rey4
Date: Fri Mar 17 08:39:17 2006
New Revision: 1284
Modified:
trunk/lib/vclib/__init__.py
Log:
Fix error messages when a path string is passed to vclib.ItemNotFound
instead of a list of path parts. We seem to do that a few places in
the svn module.
* vclib/__init__.py
(ItemNotFound.__init__): accept path strings as arguments
Modified: trunk/lib/vclib/__init__.py
Url:
http://viewvc.tigris.org/source/browse/viewvc/trunk/lib/vclib/__init__.py?view=diff&rev=1284&p1=trunk/lib/vclib/__init__.py&r1=1283&p2=trunk/lib/vclib/__init__.py&r2=1284
==============================================================================
--- trunk/lib/vclib/__init__.py (original)
+++ trunk/lib/vclib/__init__.py Fri Mar 17 08:39:17 2006
@@ -18,6 +18,7 @@
"""
import string
+import types
# item types returned by Repository.itemtype().
@@ -177,10 +178,12 @@
class ReposNotFound(Error):
pass
class ItemNotFound(Error):
- def __init__(self, path_parts):
+ def __init__(self, path):
# use '/' rather than os.sep because this is for user consumption, and
# it was defined using URL separators
- Error.__init__(self, string.join(path_parts, '/'))
+ if type(path) in (types.TupleType, types.ListType):
+ path = string.join(path, '/')
+ Error.__init__(self, path)
class InvalidRevision(Error):
def __init__(self, revision=None):
if revision is None:
|