Changeset 1625


Ignore:
Timestamp:
08/25/09 11:58:00 (15 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready to Release: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: run ori_hc3n_regression on Ubuntu 64bit

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

The task has to refer username for creating temporary filename.
I used os.environUSER to get username, but it results in regression
failure of ori_hc3n_regression script on ubuntu 64bit machine since
the USER environment variable isn't defined on that machine.
Therefore, I changed the script to use commands.getoutput('whoami') if
USER isn't defined.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/python/scantable.py

    r1615 r1625  
    454454        if rcParams['verbose']:
    455455            import os
    456             usr=os.environ['USER']
     456            if os.environ.has_key( 'USER' ):
     457                usr=os.environ['USER']
     458            else:
     459                import commands
     460                usr=commands.getoutput( 'whoami' )
    457461            tmpfile='/tmp/tmp_'+usr+'_casapy_asap_scantable_stats'
    458462            f=open(tmpfile,'w')
Note: See TracChangeset for help on using the changeset viewer.