Skip to content

Commit

Permalink
Merge pull request #220 from astraw38/astraw38-freebsdpatch
Browse files Browse the repository at this point in the history
Issue#219 - Fix for invalid stat arg on FreeBSD
  • Loading branch information
tomerfiliba committed Sep 9, 2015
2 parents 5d42308 + 2e1bedb commit 8f95899
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plumbum/machines/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,13 @@ def _path_glob(self, fn, pattern):
return matches

def _path_getuid(self, fn):
stat_cmd = "stat -c '%u,%U' " if self.uname != 'Darwin' else "stat -f '%u,%Su' "
stat_cmd = "stat -c '%u,%U' " if self.uname not in ('Darwin', 'FreeBSD') else "stat -f '%u,%Su' "
return self._session.run(stat_cmd + shquote(fn))[1].strip().split(",")
def _path_getgid(self, fn):
stat_cmd = "stat -c '%g,%G' " if self.uname != 'Darwin' else "stat -f '%g,%Sg' "
stat_cmd = "stat -c '%g,%G' " if self.uname not in ('Darwin', 'FreeBSD') else "stat -f '%g,%Sg' "
return self._session.run(stat_cmd + shquote(fn))[1].strip().split(",")
def _path_stat(self, fn):
if self.uname != 'Darwin':
if self.uname not in ('Darwin', 'FreeBSD'):
stat_cmd = "stat -c '%F,%f,%i,%d,%h,%u,%g,%s,%X,%Y,%Z' "
else:
stat_cmd = "stat -f '%HT,%Xp,%i,%d,%l,%u,%g,%z,%a,%m,%c' "
Expand Down

0 comments on commit 8f95899

Please sign in to comment.