fix : fail to create daily,weekly reports file. 74/81374/1
authorYonghee Han <onstudy@samsung.com>
Tue, 26 Jul 2016 00:28:24 +0000 (09:28 +0900)
committerYonghee Han <onstudy@samsung.com>
Tue, 26 Jul 2016 00:28:24 +0000 (09:28 +0900)
Change-Id: I0f3b7271e173c0b13a9d1b039fb6e71da7e1af79

job_sync_snapdiff.py

index e928a4d..4784171 100755 (executable)
@@ -75,7 +75,7 @@ def get_last_build(url_pub_base, repo_path, release_name):
                                   repo_path[:repo_path.rfind('/')])
     return search_last_build(last_build_url, release_name)
 
-def get_released_build(release_base, repo_path):
+def get_released_build(release_base, repo_path, release_name):
     """Return the lastest released build.
 
     :param release_base: release base url.
@@ -85,8 +85,8 @@ def get_released_build(release_base, repo_path):
     base_contains = '/'.join(repo_path.split('/')[1:-1])
     daily_url = os.path.join(release_base, 'daily', base_contains)
     weekly_url = os.path.join(release_base, 'weekly', base_contains)
-    return search_last_build(daily_url, True), \
-           search_last_build(weekly_url, True)
+    return search_last_build(daily_url, release_name, True), \
+           search_last_build(weekly_url, release_name, True)
 
 def _get_buildid(url):
     """Get build id from url"""
@@ -172,7 +172,8 @@ def main():
 
     # generate current and releases repo diff
     daily_repo_base, weekly_repo_base = get_released_build(releases_url,
-                                                           repo_path)
+                                                           repo_path,
+                                                           release_name)
 
     if daily_repo_base:
         daily_repo_url = os.path.join(daily_repo_base,