Code Duplication    Length = 12-12 lines in 2 locations

rsudp/c_tweet.py 1 location

@@ 211-222 (lines=12) @@
208
				printM('Could not find image: %s' % (imgpath), sender=self.sender)
209
210
211
	def run(self):
212
		"""
213
		Reads data from the queue and tweets a message if it sees an ALARM or IMGPATH message
214
		"""
215
		while True:
216
			d = self.getq()
217
218
			if 'ALARM' in str(d):
219
				self._when_alarm(d)
220
221
			elif 'IMGPATH' in str(d):
222
				self._when_img(d)
223

rsudp/c_telegram.py 1 location

@@ 142-153 (lines=12) @@
139
				printM('Could not find image: %s' % (imgpath), sender=self.sender)
140
141
142
	def run(self):
143
		"""
144
		Reads data from the queue and sends a message if it sees an ALARM or IMGPATH message
145
		"""
146
		while True:
147
			d = self.getq()
148
149
			if 'ALARM' in str(d):
150
				self._when_alarm(d)
151
152
			elif 'IMGPATH' in str(d):
153
				self._when_img(d)
154