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>
|
2010-02-05 Fatih Aşıcı <fatih@pardus.org.tr>
|
||||||
* pisi/version.py (compare): Allow comparing Version objects
|
* pisi/version.py (compare): Allow comparing Version objects
|
||||||
with strings.
|
with strings.
|
||||||
|
|||||||
@@ -94,7 +94,9 @@ def unlink(pattern):
|
|||||||
'''remove the file path'''
|
'''remove the file path'''
|
||||||
filePathGlob = glob.glob(pattern)
|
filePathGlob = glob.glob(pattern)
|
||||||
if len(filePathGlob) == 0:
|
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:
|
for filePath in filePathGlob:
|
||||||
if isFile(filePath) or isLink(filePath):
|
if isFile(filePath) or isLink(filePath):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user