cleanup = False
break
if cleanup:
- build.cleanup(prj, "This project has expired")
- print "%s project is remove." % prj
+ try:
+ build.cleanup(prj, "This project has expired")
+ print "%s project is remove." % prj
+ except Exception as err:
+ print "%s project is remove error = %s" % (prj, err)
else:
print "%s project is reference project. Skip remove project !!!!" % prj
- #### Purge SMR Project ####
- smr_prj_list = [ obj for obj in build.get_package_list("") \
- if not obj.find("Tizen:") == -1 \
- and not obj.find(":smr:") == -1 \
- and obj.find(":Base:") == -1 ]
-
- if os.getenv("SMR_PURGE_PRJ_HOUR"):
- remove_hour = os.getenv("SMR_PURGE_PRJ_HOUR")
- for prj in smr_prj_list:
- create_datetime = datetime.strptime(prj.split(':')[-1], "%Y%m%d.%H")
- #print create_datetime
- post_hour = divmod((now_datetime - create_datetime).total_seconds(), 3600)[0]
- if int(post_hour) > int(remove_hour):
- build.cleanup(prj, "This project has expired")
- print "%s project is remove." % prj
-
return
if __name__ == '__main__':