chime-experiment / ch_util

CHIME utilities
https://chime-experiment.github.io/ch_util
MIT License
2 stars 3 forks source link

fix(holography): fix multi-user bug with create_from_ant_log #18

Closed ashill closed 3 years ago

ashill commented 3 years ago

create_from_ant_log extracts zipped logs into /tmp to read and import into the database. This created permissions conflicts when another user had already extracted the file. Now export into /tmp/26mlogs/<username>/ instead.

Also cleanup some notifications and shorten log message.

ashill commented 3 years ago

Empirically (I checked), yes, it does create the directory if it doesn’t exist.

On Jun 8, 2021, at 07:59, Richard Shaw @.***> wrote:

[CAUTION: Non-UBC Email]

@jrs65 commented on this pull request.

In ch_util/holography.py:

@@ -601,15 +599,19 @@ def sidlst_to_csd(sid, lst, sid_ref, t_ref): zipfile.ZipFile(log).extract(post_report_file, path=basedir) except: print(

  • "failed to find {}. Moving right along...".format(
  • post_report_file
  • "Failed to extract {} into {}. Moving right along...".format(
  • post_report_file, basedir ) ) doobs = False try: zipfile.ZipFile(log).extract(ant_file, path=basedir)

Does this create the directory basedir when it runs? It doesn't seem to be mentioned in the API documentation, and I'm wondering if you need to add an additional makedir step above in case it doesn't already exist.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.