Replace FileError with ctx.ui.error since FileError is defined in pisitoolsfunctions.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user