Skip to content

Commit

Permalink
status codes fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wiro committed Dec 24, 2018
1 parent 3381c11 commit 1f6d7ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def project_export(self, project_path):

# Let's export project
r = self.__api_export(url_project_path)
if ( str(r.status_code) == "202" ):
if ( (float(r.status_code) >= 200) and (float(r.status_code) < 300) ):
# Api good, check for status
max_tries = 20
s = ""
Expand Down Expand Up @@ -91,7 +91,7 @@ def project_import(self, project_path, filepath):

# Let's import project
r = self.__api_import(project_name, namespace, filepath)
if ( str(r.status_code) == "202" ):
if ( (float(r.status_code) >= 200) and (float(r.status_code) < 300) ):
# Api good, check for status
s = ""
status_export = False
Expand Down

0 comments on commit 1f6d7ee

Please sign in to comment.