Skip to content

Commit

Permalink
zendesk-to-trello 1.1:
Browse files Browse the repository at this point in the history
* config.yaml and log path now use script path for directory (previously this would use the current working directory)
  • Loading branch information
matthew-parlette committed Jun 8, 2016
1 parent 92713e3 commit 8024a03
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions zendesk-to-trello/zendesk-to-trello
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ if __name__ == "__main__":
'-d', '--debug', action='store_true', help='Enable debug logging')
parser.add_argument(
'-c', '--config', help='Specify a config file to use',
type=str, default='config.yaml')
type=str, default=os.path.join(
os.path.dirname(os.path.realpath(__file__)), 'config.yaml'))
parser.add_argument(
'ticket', help='Ticket number to pull from trello',
type=str)
parser.add_argument('--version', action='version', version='1.0')
parser.add_argument('--version', action='version', version='1.1')
args = parser.parse_args()

# Setup logging options
Expand All @@ -96,7 +97,9 @@ if __name__ == "__main__":
log.addHandler(ch)

# File Logging
fh = logging.FileHandler(os.path.basename(__file__) + '.log')
fh = logging.FileHandler(os.path.join(os.path.dirname(
os.path.realpath(__file__)),
os.path.basename(__file__) + '.log'))
fh.setLevel(log_level)
fh.setFormatter(formatter)
log.addHandler(fh)
Expand Down

0 comments on commit 8024a03

Please sign in to comment.