git.samba.org
/
jelmer
/
python-fastimport.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2636a44
)
Check for leading slashes in paths, invalid path types.
author
Jelmer Vernooij
<jelmer@samba.org>
Sun, 12 Dec 2010 03:41:09 +0000
(
04:41
+0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Sun, 12 Dec 2010 03:41:09 +0000
(
04:41
+0100)
fastimport/commands.py
patch
|
blob
|
history
diff --git
a/fastimport/commands.py
b/fastimport/commands.py
index fe2379bfccb9af7825b8f8c3d130b976d53b207b..f3b9541a34f9167b1919da1e9a1a5a68471309be 100644
(file)
--- a/
fastimport/commands.py
+++ b/
fastimport/commands.py
@@
-384,8
+384,10
@@
def check_path(path):
:return: the path if all is OK
:raise ValueError: if the path is illegal
"""
- if path is None or path == '':
+ if path is None or path == ''
or path[0] == "/"
:
raise ValueError("illegal path '%s'" % path)
+ if type(path) != str:
+ raise TypeError("illegale type for path '%r'" % path)
return path