Yuvipanda has submitted this change and it was merged.

Change subject: Make repos.yaml be read from relative path of src
......................................................................


Make repos.yaml be read from relative path of src

Change-Id: I66a8d9d804e654f1291b14809f24dd5d6fd13295
---
R repos.yaml
M src/github-to-gerrit.py
2 files changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/src/repos.yaml b/repos.yaml
similarity index 100%
rename from src/repos.yaml
rename to repos.yaml
diff --git a/src/github-to-gerrit.py b/src/github-to-gerrit.py
index 4c9ab4a..a17d840 100644
--- a/src/github-to-gerrit.py
+++ b/src/github-to-gerrit.py
@@ -18,9 +18,11 @@
 
 BASE_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
 CONFIG_PATH = os.path.join(BASE_PATH, 'config.yaml')
+REPOS_PATH = os.path.join(BASE_PATH, 'repos.yaml')
 WORKING_DIR = os.path.expanduser("~/.sucharepos")
 
-REPOS_MAPPING = yaml.load(open('repos.yaml'))
+with open(REPOS_PATH) as f:
+    REPOS_MAPPING = yaml.load(f)
 REPOS_GITHUB_TO_GERRIT = REPOS_MAPPING['repos']
 REPOS_GERRIT_TO_GITHUB = {v:k for k, v in REPOS_GITHUB_TO_GERRIT.iteritems()}
 OWNER = "wikimedia"

-- 
To view, visit https://gerrit.wikimedia.org/r/77711
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I66a8d9d804e654f1291b14809f24dd5d6fd13295
Gerrit-PatchSet: 5
Gerrit-Project: labs/tools/SuchABot
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to