Skip to content

Commit

Permalink
make grp optional in buskill module too
Browse files Browse the repository at this point in the history
  • Loading branch information
maltfield committed Jun 10, 2024
1 parent 4836df1 commit 391c807
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/packages/buskill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
################################################################################

import platform, multiprocessing, traceback, subprocess
import urllib.request, re, json, certifi, sys, os, grp, pwd, math, shutil, tempfile, random, gnupg, configparser
import urllib.request, re, json, certifi, sys, os, pwd, math, shutil, tempfile, random, gnupg, configparser
import os.path
from buskill_version import BUSKILL_VERSION
from packaging.version import Version
Expand All @@ -31,7 +31,7 @@
# platform-specific modules
CURRENT_PLATFORM = platform.system().upper()
if CURRENT_PLATFORM.startswith( 'LINUX' ):
import usb1
import usb1, grp
msg = "usb1.__version__:|" +str(usb1.__version__)+ "|"
print( msg ); logger.debug( msg )

Expand All @@ -40,7 +40,7 @@
from ctypes import *

if CURRENT_PLATFORM.startswith( 'DARWIN' ):
import usb1, ctypes, ctypes.util
import usb1, ctypes, ctypes.util, grp
from ctypes import byref
msg = "usb1.__version__:|" +str(usb1.__version__)+ "|"
print( msg ); logger.debug( msg )
Expand Down Expand Up @@ -677,8 +677,9 @@ def spawn_root_child(self):
msg = "DEBUG: root_child gid owner:|" +str(group)+ "|"
print( msg ); logger.debug( msg )

msg = "DEBUG: root_child group owner name:|" +str(grp.getgrgid(group))+ "|"
print( msg ); logger.debug( msg )
if grp:
msg = "DEBUG: root_child group owner name:|" +str(grp.getgrgid(group))+ "|"
print( msg ); logger.debug( msg )

# verify the mode of the file is exactly 0500 (octal)
if mode != '0500':
Expand Down

0 comments on commit 391c807

Please sign in to comment.