# HG changeset patch # User Henry Thompson # Date 1582065668 0 # Node ID cbd13beb09223646a0421b8408e0b22664e8f05d # Parent 83ed7c5846b2ef6ad04812dd80bc2f142274a8c7 only create links file if there are some diff -r 83ed7c5846b2 -r cbd13beb0922 bin/plinks.py --- a/bin/plinks.py Tue Feb 18 22:19:51 2020 +0000 +++ b/bin/plinks.py Tue Feb 18 22:41:08 2020 +0000 @@ -13,10 +13,11 @@ (fno,f)=l.rstrip().split() try: links=run(f) - with open('/dev/shm/x/links_%s'%fno,'w') as of: - for k in links.keys(): - for l in links[k]: - print("%s\t%s"%(k,l),file=of) + if links: + with open('/dev/shm/x/links_%s'%fno,'w') as of: + for k in links.keys(): + for l in links[k]: + print("%s\t%s"%(k,l),file=of) except Exception as e: print("%s\t%s"%(fno,e),file=bf) if (path.exists('/dev/shm/stopJob')):