def _create_directory(self):
        if not os.path.exists(self.db_dir):
            os.makedirs(self.db_dir)
            db_revision = open(os.path.join(self.db_dir, "db_revision"), mode='w')
            db_revision.write(str(self.current_db_revision))
            db_revision.close()
            log.debug("Created the configuration directory: %s", str(self.db_dir))
        if not os.path.exists(self.blobfile_dir):
            os.makedirs(self.blobfile_dir)
            log.debug("Created the data directory: %s", str(self.blobfile_dir))
        if os.name == "nt":
            if not os.path.exists(self.wallet_dir):
                os.makedirs(self.wallet_dir)
            if not os.path.exists(self.wallet_conf):
                lbrycrd_conf = open(self.wallet_conf, mode='w')
                self.wallet_user = "rpcuser"
                lbrycrd_conf.write(self.wallet_user % "rpcuser=%s\n")
                self.wallet_password = binascii.hexlify(Random.new().read(20))
                lbrycrd_conf.write("rpcpassword=%s\n" % self.wallet_password)
                lbrycrd_conf.write("server=1\n")
                lbrycrd_conf.close()
            else:
                lbrycrd_conf = open(self.wallet_conf)
                for l in lbrycrd_conf:
                    if l.startswith("rpcuser="):
                        self.wallet_user = l[8:].rstrip('\n')
                    if l.startswith("rpcpassword="):
                        self.wallet_password = l[12:].rstrip('\n')
                    if l.startswith("rpcport="):
                        self.wallet_rpc_port = int(l[8:-1].rstrip('\n'))
dataset/ETHPy150Open lbryio/lbry/lbrynet/lbrynet_gui/LBRYGui.py/LBRYDownloader._create_directory/swapped operands of `%`