Esempio n. 1
0
    def setname(self, lname):

        localfile = os.path.join(self.lootpath, self.luuid, "name")
        tlocalfile = tmpname.get(localfile)

        f = open(tlocalfile[1], "w")
        f.write(lname)
        f.close()

        tools.rename(tlocalfile[1], tlocalfile[0])

        # self is added for the same forban doing the announce
        # and the discovery

        myid = fid.manage(dynpath=self.dynpath)
        if myid.get() == self.luuid:
            localfile = os.path.join(self.lootpath, self.luuid, "self")
            tlocalfile = tmpname.get(localfile)
            f = open(tlocalfile[1], "w")
            f.write("")
            f.close()
            tools.rename(tlocalfile[1], tlocalfile[0])
Esempio n. 2
0
    def setname(self, lname):

        localfile = os.path.join(self.lootpath, self.luuid, "name")
        tlocalfile = tmpname.get(localfile)

        f = open(tlocalfile[1], "w")
        f.write(lname)
        f.close()

        tools.rename(tlocalfile[1], tlocalfile[0])

        # self is added for the same forban doing the announce
        # and the discovery

        myid = fid.manage(dynpath=self.dynpath)
        if myid.get() == self.luuid:
            localfile = os.path.join(self.lootpath, self.luuid, "self")
            tlocalfile = tmpname.get(localfile)
            f = open(tlocalfile[1], "w")
            f.write("")
            f.close()
            tools.rename(tlocalfile[1], tlocalfile[0])
Esempio n. 3
0
    def whoami(self):

        lfid = fid.manage(dynpath=self.dynpath)
        return lfid.get()
Esempio n. 4
0
 def gen(self):
     self.payload = "forban;name;" + self.name + ";"
     myid = fid.manage(dynpath=self.dynpath)
     self.payload = self.payload + "uuid;" + myid.get()
Esempio n. 5
0
 def gen (self):
         self.payload    = "forban;name;" + self.name + ";"
         myid = fid.manage(dynpath=self.dynpath)
         self.payload    = self.payload + "uuid;" + myid.get()
Esempio n. 6
0
    def whoami(self):

        lfid = fid.manage(dynpath=self.dynpath)
        return lfid.get()