Skip to content

Commit

Permalink
fix(gihub): set username for cameo
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-gricourt committed Aug 25, 2022
1 parent 6b90512 commit 5fc43ab
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/rpfbagr/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import getpass
import logging
import os
import sys
Expand Down Expand Up @@ -157,6 +158,18 @@ def main():
logger.debug("Create out directory: %s")
os.makedirs(os.path.dirname(args.output_file_tsv))

try:
getpass.getuser()
except Exception as e:
if args.email:
os.environ["USERNAME"] = args.email
else:
logger.error(str(e))
logger.error(
"A login name must be provided for Cameo with --email argument"
)
parser.exit(1)

# Load model
logger.info("Build model")
model = build_model(
Expand Down

0 comments on commit 5fc43ab

Please sign in to comment.