Skip to content

Commit

Permalink
add option for tmpdir
Browse files Browse the repository at this point in the history
imagebuilder.tar will be extrachted there
  • Loading branch information
aparcar committed Jul 3, 2017
1 parent 48dad1d commit 8f60c79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions update-server/config.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ database_name: attendedsysupgrade
database_user: upimaged
database_pass: password
database_port: 5432
tmpdir: None

distributions:
lede: https://downloads.lede-project.org/releases/
Expand Down
2 changes: 1 addition & 1 deletion update-server/imagebuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def run(self):
return True

def download(self, url):
with tempfile.TemporaryDirectory() as tar_folder:
with tempfile.TemporaryDirectory(dir=self.config.get("tempdir") as tar_folder:
create_folder(self.path)
tar_path = os.path.join(tar_folder, "imagebuilder.tar.xz")
self.log.info("downloading url %s", url)
Expand Down

1 comment on commit 8f60c79

@dangowrt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

introduced #18

Please sign in to comment.