Skip to content

Commit

Permalink
Merge pull request #2 from prisms-center/4.X
Browse files Browse the repository at this point in the history
getlogin bug fix
  • Loading branch information
bpuchala authored Feb 28, 2018
2 parents b6b1aae + 61b2348 commit e9e19b3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ If installing to a user directory, you may need to set your PATH to find the ins
git clone https://github.com/prisms-center/prisms_jobs.git
cd prisms_jobs

2. Checkout the branch/tag containing the version you wish to install. Latest is ``v4.0.0``:
2. Checkout the branch/tag containing the version you wish to install. Latest is ``v4.0.1``:

git checkout v4.0.0
git checkout v4.0.1

2. From the root directory of the repository:

Expand Down
4 changes: 2 additions & 2 deletions conda-recipes/prisms_jobs/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package:
name: prisms-jobs
version: "4.0.0"
version: "4.0.1"

source:
git_rev: v4.0.0
git_rev: v4.0.1
git_url: https://github.com/prisms-center/prisms_jobs.git

requirements:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
# The short X.Y version.
version = u'4.0'
# The full version, including alpha/beta/rc tags.
release = u'4.0.0'
release = u'4.0.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Install from source
git clone https://github.com/prisms-center/prisms_jobs.git
cd prisms_jobs

2. Checkout the branch/tag containing the version you wish to install. Latest is ``v4.0.0``:
2. Checkout the branch/tag containing the version you wish to install. Latest is ``v4.0.1``:

::

git checkout v4.0.0
git checkout v4.0.1

3. From the root directory of the repository:

Expand Down
2 changes: 1 addition & 1 deletion prisms_jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __str__(self):
from prisms_jobs.job import Job
from prisms_jobs.jobdb import JobDB, JobDBError, EligibilityError, complete_job, error_job

__version__ = '4.0.0'
__version__ = '4.0.1'
__all__ = [
'Job',
'JobDB',
Expand Down
9 changes: 4 additions & 5 deletions prisms_jobs/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import datetime
import os
import pwd
import subprocess
import sys

Expand Down Expand Up @@ -61,11 +62,9 @@ def run(cmd, input=None, stdin=None, encoding=None):
def getlogin():
"""Returns os.getlogin(), else os.environ["LOGNAME"], else "?" """
try:
return os.getlogin()
except OSError:
return os.environ["LOGNAME"]
else:
return "?"
return pwd.getpwuid(os.getuid())[0]
except:
return os.environ.get("LOGNAME","?")

def seconds(walltime):
"""Convert [[[DD:]HH:]MM:]SS to hours"""
Expand Down

0 comments on commit e9e19b3

Please sign in to comment.