Skip to content

Commit

Permalink
Merge pull request OpenShot#2963 from ferdnyc/title-editor-cleanup
Browse files Browse the repository at this point in the history
Title editor: linter fixes, log import failure reason
  • Loading branch information
jonoomph authored Nov 17, 2019
2 parents a9b4116 + 7cdbcb8 commit dc13800
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/windows/title_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
You should have received a copy of the GNU General Public License
along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
"""
"""

import sys
import os
Expand Down Expand Up @@ -208,7 +208,7 @@ def load_svg_template(self):
try:
self.settingsContainer.layout().removeWidget(child)
child.deleteLater()
except:
except Exception:
pass

# Get text nodes and rect nodes
Expand Down Expand Up @@ -429,7 +429,7 @@ def update_font_color_button(self):
# Parse the result
txt = ar[color]
color = txt[5:]
except:
except Exception:
# If the color was in an invalid format, try the next text element
continue

Expand All @@ -439,7 +439,7 @@ def update_font_color_button(self):
# Parse the result
txt = ar[opacity]
opacity = float(txt[8:])
except:
except Exception:
pass

# Default the font color to white if non-existing
Expand Down Expand Up @@ -710,8 +710,9 @@ def add_file(self, filepath):
file.save()
return True

except:
except Exception as ex:
# Handle exception
log.error('Could not import {}: {}'.format(filename, str(ex)))
msg = QMessageBox()
msg.setText(_("{} is not a valid video, audio, or image file.".format(filename)))
msg.exec_()
Expand Down

0 comments on commit dc13800

Please sign in to comment.