equal
deleted
inserted
replaced
57 Throws a `VMMError` if the `binary` isn't a file or is not |
57 Throws a `VMMError` if the `binary` isn't a file or is not |
58 executable. |
58 executable. |
59 """ |
59 """ |
60 binary = expand_path(binary) |
60 binary = expand_path(binary) |
61 if not os.path.isfile(binary): |
61 if not os.path.isfile(binary): |
62 raise VMMError(_(u"'%s' is not a file") % get_unicode(binary), |
62 raise VMMError(_(u"No such file: '%s'") % get_unicode(binary), |
63 NO_SUCH_BINARY) |
63 NO_SUCH_BINARY) |
64 if not os.access(binary, os.X_OK): |
64 if not os.access(binary, os.X_OK): |
65 raise VMMError(_(u"File is not executable: '%s'") % |
65 raise VMMError(_(u"File is not executable: '%s'") % |
66 get_unicode(binary), NOT_EXECUTABLE) |
66 get_unicode(binary), NOT_EXECUTABLE) |
67 return binary |
67 return binary |