Skip to content

Commit

Permalink
Fixing ternary expression for username too
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslittle committed Feb 7, 2015
1 parent 4e27407 commit 2685ada
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 2685ada

Please sign in to comment.