Skip to content

Commit

Permalink
Now flips the executable bit on the bin_file for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
James Townley committed Feb 8, 2016
1 parent c7245eb commit 284e5e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/firmware/firmware.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sys
import os
import stat
import usb
from subprocess import Popen, PIPE

Expand Down Expand Up @@ -57,6 +58,8 @@ class LinuxFirmwareUpdater(FirmwareUpdater):
def dfu_bin(self):
bin_file = os.path.join(self.dependancy_path, 'dfu-util')
if os.path.isfile(bin_file):
st = os.stat(bin_file)
os.chmod(bin_file, st.st_mode | stat.S_IEXEC)
return os.path.join(self.dependancy_path, 'dfu-util')
else:
if self._logger:
Expand Down

0 comments on commit 284e5e0

Please sign in to comment.