Replace FileError with ctx.ui.error since FileError is defined in pisitoolsfunctions.

This commit is contained in:
Gökçen Eraslan
2010-02-12 09:48:08 +00:00
parent f77b7e39bc
commit 228b1080fa
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -1,3 +1,7 @@
2010-02-12 Gökçen Eraslan <gokcen@pardus.org.tr>
* pisi/actionsapi/shelltools.py: Replace FileError with ctx.ui.error
since FileError is defined in pisitoolsfunctions.
2010-02-05 Fatih Aşıcı <fatih@pardus.org.tr>
* pisi/version.py (compare): Allow comparing Version objects
with strings.
+3 -1
View File
@@ -94,7 +94,9 @@ def unlink(pattern):
'''remove the file path'''
filePathGlob = glob.glob(pattern)
if len(filePathGlob) == 0:
raise FileError(_("No file matched pattern \"%s\". Remove operation failed.") % pattern)
ctx.ui.error(_("No file matched pattern \"%s\". Remove operation failed.") % pattern)
return
for filePath in filePathGlob:
if isFile(filePath) or isLink(filePath):
try: