Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: Remove unused config field ""user_callback.no_logging" (#1887) #1890

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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