Skip to content

Commit

Permalink
Merge pull request exxeleron#22 from jameslittle/master
Browse files Browse the repository at this point in the history
Fixing bug in ternary operator to allow username w/ blank password
  • Loading branch information
maciejlach committed Feb 7, 2015
2 parents 423ee60 + 2685ada commit 6e8b524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qpython/qconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def is_connected(self):

def _initialize(self):
'''Performs a IPC protocol handshake.'''
credentials = self.username + ':' + self.password if self.password else ''
credentials = (self.username if self.username else '') + ':' + (self.password if self.password else '')
self._connection.send(credentials + '\3\0')
response = self._connection.recv(1)

Expand Down

0 comments on commit 6e8b524

Please sign in to comment.