# Buggy code
def getdevnums(self):
    """Return a devices major/minor numbers from dictionary"""
    return self.data["devnums"][1:]


# Traceback (FileNotFoundError)
# rdiff-backup /dev/ /tmp/faketarget/
Exception '[Errno 2] No such file or directory: b'/tmp/faketarget/bus/usb/003/rdiff-backup.tmp.22'' raised of class '<class 'FileNotFoundError'>':
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 390, in error_check_Main
Main(arglist)
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 412, in Main
take_action(rps)
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 348, in take_action
Backup(rps[0], rps[1])
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 437, in Backup
backup.Mirror(rpin, rpout)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 39, in Mirror
DestS.patch(dest_rpath, source_diffiter)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 269, in patch
ITR(diff.index, diff)
File "/usr/lib/python3/dist-packages/rdiff_backup/rorpiter.py", line 313, in __call__
last_branch.fast_process(*args)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 587, in fast_process
if self.patch_to_temp(mirror_rp, diff_rorp, tf):
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 612, in patch_to_temp
result = self.patch_snapshot_to_temp(diff_rorp, new)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 655, in patch_snapshot_to_temp
rpath.copy_attribs(diff_rorp, new)
File "/usr/lib/python3/dist-packages/rdiff_backup/rpath.py", line 240, in copy_attribs
rpout.chown(*rpout.conn.user_group.map_rpath(rpin))
File "/usr/lib/python3/dist-packages/rdiff_backup/rpath.py", line 1192, in chown
self.conn.os.chown(self.path, uid, gid)

Traceback (most recent call last):
File "/usr/bin/rdiff-backup", line 32, in <module>
rdiff_backup.Main.error_check_Main(sys.argv[1:])
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 390, in error_check_Main
Main(arglist)
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 412, in Main
take_action(rps)
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 348, in take_action
Backup(rps[0], rps[1])
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 437, in Backup
backup.Mirror(rpin, rpout)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 39, in Mirror
DestS.patch(dest_rpath, source_diffiter)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 269, in patch
ITR(diff.index, diff)
File "/usr/lib/python3/dist-packages/rdiff_backup/rorpiter.py", line 313, in __call__
last_branch.fast_process(*args)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 587, in fast_process
if self.patch_to_temp(mirror_rp, diff_rorp, tf):
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 612, in patch_to_temp
result = self.patch_snapshot_to_temp(diff_rorp, new)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 655, in patch_snapshot_to_temp
rpath.copy_attribs(diff_rorp, new)
File "/usr/lib/python3/dist-packages/rdiff_backup/rpath.py", line 240, in copy_attribs
rpout.chown(*rpout.conn.user_group.map_rpath(rpin))
File "/usr/lib/python3/dist-packages/rdiff_backup/rpath.py", line 1192, in chown
self.conn.os.chown(self.path, uid, gid)
FileNotFoundError: [Errno 2] No such file or directory: b'/tmp/faketarget/bus/usb/003/rdiff-backup.tmp.22'

# Fixed code
def getdevnums(self):
    """Return a device's type and major/minor numbers from dictionary"""
    return self.data["devnums"]