Skip to content

Commit

Permalink
Fix: code style
Browse files Browse the repository at this point in the history
Signed-off-by: h-suzuki <[email protected]>
  • Loading branch information
h-suzuki-isp committed Mar 7, 2024
1 parent 1b29853 commit 1d32d27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ros2caret/verb/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# limitations under the License.

import os.path

from ros2caret.verb import VerbExtension
from ament_index_python.packages import get_package_share_directory, PackageNotFoundError
import xml.etree.ElementTree as ET

from ros2caret.verb import VerbExtension


class CaretVersionVerb(VerbExtension):

Expand All @@ -34,7 +34,7 @@ def get_version(self):
root = tree.getroot()
version_element = root.find('version')
if version_element is None:
raise RuntimeError("Error: Package version not found in package.xml")
raise RuntimeError('Error: Package version not found in package.xml')
return version_element.text
except(PackageNotFoundError, FileNotFoundError):
raise RuntimeError("Error: package or file share/ros2caret/package.xml not found")
raise RuntimeError('Error: package or file share/ros2caret/package.xml not found')

0 comments on commit 1d32d27

Please sign in to comment.