Skip to content

Commit

Permalink
fix htaccess bytes string
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad88me committed Dec 10, 2020
1 parent 77cd145 commit f5712f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions OnToology/autoncore.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def init_g():
g = Github(username, password)
return g


def git_magic(target_repo, user, changed_filesss, branch, raise_exp=False):
"""
:param target_repo: user/reponame
Expand All @@ -130,7 +131,7 @@ def git_magic(target_repo, user, changed_filesss, branch, raise_exp=False):
global parent_folder
global log_file_dir

print("\n\n\n In gitmagic print")
print("\n\n\n In gitmagic print: user <%s>" % str(user))
logger_fname = prepare_logger(user)
parent_folder = user
if not settings.test_conf['local']:
Expand Down Expand Up @@ -1011,7 +1012,9 @@ def publish(name, target_repo, ontology_rel_path, useremail):
return error_msg
dolog("publish> htaccess content: ")
dolog(str(type(htaccess)))
htaccess = str(htaccess)
if isinstance(htaccess, bytes):
htaccess = htaccess.decode('utf-8')
# htaccess = str(htaccess)
dolog(str(type(htaccess)))
dolog(htaccess)
new_htaccess = htaccess_github_rewrite(target_repo=target_repo, htaccess_content=htaccess,
Expand Down
4 changes: 2 additions & 2 deletions OnToology/rabbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def run_rabbit():
# """
# return direct_call(message_json)


def send(message_json):
"""
:param message:
Expand Down Expand Up @@ -164,7 +165,6 @@ def get_num_of_processes_of_rabbit():
return -1



def direct_call(j):
"""
Consume messages from the ready queue
Expand Down Expand Up @@ -200,7 +200,6 @@ def direct_call(j):
return False



def callback_consumer(lock, sender, receiver, logger, j):
# lock = extra['lock']
# logger = extra['logger']
Expand Down Expand Up @@ -231,6 +230,7 @@ def callback_consumer(lock, sender, receiver, logger, j):
lock.release()
logger.debug("")


def callback2(extra, ch, method, properties, body):
"""
Consume messages from the ready queue
Expand Down

0 comments on commit f5712f8

Please sign in to comment.