diff --git a/datadog/dogshell/wrap.py b/datadog/dogshell/wrap.py
index 022b333..a454d33 100644
--- a/datadog/dogshell/wrap.py
+++ b/datadog/dogshell/wrap.py
@@ -211,8 +211,9 @@ def build_event_body(cmd, returncode, stdout, stderr, notifications):
         )
 
     if notifications:
+        notifications = notifications.decode("utf-8", "replace") if isinstance(notifications, bytes) else notifications
         fmt_notifications = u"**>>>> NOTIFICATIONS <<<<**\n\n {notifications}\n".format(
-            notifications=notifications.decode("utf-8", "replace")
+            notifications=notifications
         )
 
     return \

String decode in dogwrap
**Describe the bug**
The parameters `notify_success`, `notify_warning` and `notify_error` cause the `AttributeError` shown below to be thrown when used.

```
Traceback (most recent call last):
  File "/usr/local/bin/dogwrap", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/datadog/dogshell/wrap.py", line 377, in main
    event_body = build_event_body(cmd, returncode, stdout, stderr, notifications)
  File "/usr/local/lib/python3.7/site-packages/datadog/dogshell/wrap.py", line 209, in build_event_body
    notifications=notifications.decode("utf-8", "replace")
AttributeError: 'str' object has no attribute 'decode'
```

Line 209 attempts to call a decode method on a string. To my knowledge, this method has been removed in python3.

**To Reproduce**
Steps to reproduce the behavior:
1. Install datadog for python3
2. Execute the `dogwrap` command with the `--notify_error` flag set to any string and a command that causes an error
3. Get an exception

**Expected behavior**
The datadog event to be logged with the string specified by `--notify_error` in after `**>>>> NOTIFICATIONS <<<<**`

**Screenshots**
```
$ dogwrap -n "Example Error" -k ${API_KEY} --submit_mode errors --notify_error "test notification" "pwd -h"

Traceback (most recent call last):
  File "/usr/local/bin/dogwrap", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/datadog/dogshell/wrap.py", line 377, in main
    event_body = build_event_body(cmd, returncode, stdout, stderr, notifications)
  File "/usr/local/lib/python3.7/site-packages/datadog/dogshell/wrap.py", line 209, in build_event_body
    notifications=notifications.decode("utf-8", "replace")
AttributeError: 'str' object has no attribute 'decode'
```

**Environment and Versions (please complete the following information):**
```
$ python3 --version
Python 3.7.6
$ dogwrap --version
dogwrap 0.34.1
```

diff --git a/tests/unit/dogwrap/test_dogwrap.py b/tests/unit/dogwrap/test_dogwrap.py
index e4cd2a3..02341ca 100644
--- a/tests/unit/dogwrap/test_dogwrap.py
+++ b/tests/unit/dogwrap/test_dogwrap.py
@@ -47,6 +47,11 @@ class TestDogwrap(unittest.TestCase):
         event_body = build_event_body(cmd, returncode, stdout, stderr, notifications)
         self.assertEqual(expected_body, event_body)
 
+        # notifications can be unicode already in py3, make sure we don't try decoding
+        notifications = notifications.decode("utf-8", "replace")
+        event_body = build_event_body(cmd, returncode, stdout, stderr, notifications)
+        self.assertEqual(expected_body, event_body)
+
     def test_parse_options(self):
         options, cmd = parse_options([])
         self.assertEqual(cmd, '')

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest mock freezegun pytest-vcr python-dateutil
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi==2025.1.31
charset-normalizer==3.4.1
-e git+https://github.com/DataDog/datadogpy.git@6319ebde0e6bce51c5f6c21f253204c3a13f4d92#egg=datadog
decorator==5.2.1
exceptiongroup==1.2.2
freezegun==1.5.1
idna==3.10
iniconfig==2.1.0
mock==5.2.0
multidict==6.2.0
packaging==24.2
pluggy==1.5.0
propcache==0.3.1
pytest==8.3.5
pytest-vcr==1.0.2
python-dateutil==2.9.0.post0
PyYAML==6.0.2
requests==2.32.3
six==1.17.0
tomli==2.2.1
typing_extensions==4.13.0
urllib3==1.26.20
vcrpy==7.0.0
wrapt==1.17.2
yarl==1.18.3

name: datadogpy
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - decorator==5.2.1
      - exceptiongroup==1.2.2
      - freezegun==1.5.1
      - idna==3.10
      - iniconfig==2.1.0
      - mock==5.2.0
      - multidict==6.2.0
      - packaging==24.2
      - pluggy==1.5.0
      - propcache==0.3.1
      - pytest==8.3.5
      - pytest-vcr==1.0.2
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.2
      - requests==2.32.3
      - six==1.17.0
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - urllib3==1.26.20
      - vcrpy==7.0.0
      - wrapt==1.17.2
      - yarl==1.18.3
prefix: /opt/conda/envs/datadogpy

tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_build_event_body
tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_execute tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_execute_cmd_timeout tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_execute_exit_code tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_execute_oserror tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_execute_popen_fail tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_execute_sigkill_timeout tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_execute_sigterm_timeout tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_output_reader tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_parse_options tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_poll_proc tests/unit/dogwrap/test_dogwrap.py::TestDogwrap::test_poll_timeout
datadog/dogshell/wrap.py
datadog/dogshell/wrap.py