(self, tarinfo, targetpath)
Make a character or block device called targetpath.
Make a character or block device called targetpath.
Make a character or block device called targetpath .
def makedev(self, tarinfo, targetpath):
        """Make a character or block device called targetpath.
        """
        if not hasattr(os, "mknod") or not hasattr(os, "makedev"):
            raise ExtractError("special devices not supported by system")

        mode = tarinfo.mode
        if tarinfo.isblk():
            mode |= stat.S_IFBLK
        else:
            mode |= stat.S_IFCHR

        os.mknod(targetpath, mode,
                 os.makedev(tarinfo.devmajor, tarinfo.devminor))
def makedev ( self , tarinfo , targetpath ) : if not hasattr ( os , "mknod" ) or not hasattr ( os , "makedev" ) : raise ExtractError ( "special devices not supported by system" ) mode = tarinfo . mode if tarinfo . isblk ( ) : mode |= stat . S_IFBLK else : mode |= stat . S_IFCHR os . mknod ( targetpath , mode , os . makedev ( tarinfo . devmajor , tarinfo . devminor ) )