connectordb/_device.py
def export(self, directory):
        """Exports the device to the given directory. The directory can't exist. 
        You can later import this device by running import_device on a user.
        """
        if os.path.exists(directory):
            raise FileExistsError(
                "The device export directory already exists")

        os.mkdir(directory)

        # Write the device's info
        with open(os.path.join(directory, "device.json"), "w") as f:
            json.dump(self.data, f)

        # Now export the streams one by one
        for s in self.streams():
            s.export(os.path.join(directory, s.name))
def export(self, directory):
        if os.path.exists(directory):
            raise FileExistsError(
                "The device export directory already exists")

        os.mkdir(directory)

        # Write the device's info
        with open(os.path.join(directory, "device.json"), "w") as f:
            json.dump(self.data, f)

        # Now export the streams one by one
        for s in self.streams():
            s.export(os.path.join(directory, s.name))
def export ( self , directory ) : if os . path . exists ( directory ) : raise FileExistsError ( "The device export directory already exists" ) os . mkdir ( directory ) # Write the device's info with open ( os . path . join ( directory , "device.json" ) , "w" ) as f : json . dump ( self . data , f ) # Now export the streams one by one for s in self . streams ( ) : s . export ( os . path . join ( directory , s . name ) )
Exports the device to the given directory. The directory can't exist. 
        You can later import this device by running import_device on a user.
Exports the device to the given directory . The directory can t exist . You can later import this device by running import_device on a user .