temp filename is now random

This commit is contained in:
Hamad alghanim
2017-10-17 01:36:48 -07:00
parent 6f40a34251
commit 3729c635f8
+6 -3
View File
@@ -1743,10 +1743,13 @@ def install(
if not pre:
pre = project.settings.get('allow_prereleases')
temporary_requirements = "requirements-temp.txt"
remote = False
# Using current time to generate a random filename to avoid
now = time.localtime()
temporary_requirements = "requirments{0}{1}{2}{3}{4}{5}.txt".format(
now.tm_year, now.tm_mon, now.tm_mday, now.tm_hour, now.tm_min, now.tm_sec)
remote = requirements and is_valid_url(requirements)
# Check if the file is remote or not
if requirements and is_valid_url(requirements):
if remote:
# Download requirements file
click.echo(
crayons.normal(