1045 |
mode = stat.S_IFBLK | 0600 |
mode = stat.S_IFBLK | 0600 |
1046 |
else: raise RPathException |
else: raise RPathException |
1047 |
try: self.conn.os.mknod(self.path, mode, self.conn.os.makedev(major, minor)) |
try: self.conn.os.mknod(self.path, mode, self.conn.os.makedev(major, minor)) |
1048 |
except OSError, e: |
except (OSError, AttributeError), e: |
1049 |
if e.errno == errno.EPERM: |
if isinstance(e, AttributeError) or e.errno == errno.EPERM: |
1050 |
|
# AttributeError will be raised by Python 2.2, which |
1051 |
|
# doesn't have os.mknod |
1052 |
log.Log("unable to mknod %s -- using touch instead" % self.path, 4) |
log.Log("unable to mknod %s -- using touch instead" % self.path, 4) |
1053 |
self.touch() |
self.touch() |
1054 |
self.setdata() |
self.setdata() |