Skip to content

Commit

Permalink
refactor!: Remove unused config field ""user_callback.no_logging" (#1887
Browse files Browse the repository at this point in the history
)

Config field was added in version 1.1.7 (a010fa2). No indication of its usage.

Fix #1887
  • Loading branch information
buhtz authored Oct 3, 2024
1 parent 1ecedfa commit 218cc90
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Version 1.5.3-dev (development of upcoming release)
* Refactor: Remove class OrderedSet
* Refactor: Remove os.system() from class Execute
* Refactor: Systray notifications send utilize DBUS instead of notify-send (#1156) (Felix Stupp @Zocker1999NET)
* Refactor!: Remove unused config field "user_callback.no_logging" (#1887)
* Dependency: Remove libnotify-bin (notify-send) (#1156)
* Build: Replace "pycodestyle" linter with "flake8" (#1839)

Expand Down
7 changes: 0 additions & 7 deletions common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1295,13 +1295,6 @@ def takeSnapshotRegardlessOfChanges(self, profile_id = None):
def setTakeSnapshotRegardlessOfChanges(self, value, profile_id = None):
return self.setProfileBoolValue('snapshots.take_snapshot_regardless_of_changes', value, profile_id)

def userCallbackNoLogging(self, profile_id = None):
#?Do not catch std{out|err} from user-callback script.
#?The script will only write to current TTY.
#?Default is to catch std{out|err} and write it to
#?syslog and TTY again.
return self.profileBoolValue('user_callback.no_logging', False, profile_id)

def globalFlock(self):
#?Prevent multiple snapshots (from different profiles or users) to be run at the same time
return self.boolValue('global.use_flock', False)
Expand Down
5 changes: 1 addition & 4 deletions common/plugins/usercallbackplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ def callback(self, *args, profileID=None):

logger.debug(f'Call user-callback: {" ".join(cmd)}', self)

if self.config.userCallbackNoLogging():
stdout, stderr = None, None
else:
stdout, stderr = PIPE, PIPE
stdout, stderr = PIPE, PIPE

try:
callback = Popen(cmd,
Expand Down

0 comments on commit 218cc90

Please sign in to comment.